<?php
    session_start(); 
    if(!isset($_SESSION['utente'])){ 
        exit("Accesso negato"); 
   	}
    else {
			include 'connect.php';
			if (isset($_GET['id']) && is_numeric($_GET['id'])) {
				$id = $_GET['id'];
				$result = mysql_query("DELETE FROM articoli WHERE id=$id") or die(mysql_error());
				header("Location: ./../post.php");
			}
			else {
				header("Location: ./../post.php");
			}
		}
?>